P3D:

MAIN3D = newmain3D

include Make.1
include base/Makefile

-include .depend

SRCS = base/constants.f90 base/precision.f90 base/object.F90 \
	base/misc.F90 base/interp.f90 base/diffEq.f90 \
	base/integration.F90 base/parameters.F90 base/universe.F90 base/root.f90 \
	base/linearPower.F90 base/fit.F90 base/PSfits.F90 \
	base/chi.F90 base/weakLensing.f90 base/sici.f90 \
	base/nu.F90 base/haloModel.F90 \
	smithp3d.f90

VPATH = objs

F90FLAGS = -DIFORT -u -module objs -Iobjs -g

#P3D: DEF += -DDEV
#
P3D: objs/constants.o objs/precision.o objs/object.o objs/misc.o \
	objs/interp.o objs/diffEq.o objs/integration.o objs/universe.o \
	objs/root.o objs/linearPower.o objs/fit.o objs/PSfits.o objs/$(MAIN3D).o \
	objs/smithp3d.o
	$(F90C) $(LINKFLAGS) -o $@ $^ $(LIBS) 

P2D: DEF += -DOLD_PARAMETERS
P2D: objs/constants.o objs/precision.o objs/object.o objs/misc.o \
	objs/interp.o objs/diffEq.o objs/integration.o objs/universe.o \
	objs/root.o objs/linearPower.o objs/fit.o objs/PSfits.o objs/chi.o \
	objs/weakLensing.o objs/sici.o objs/nu.o objs/haloModel.o objs/PS.o \
	objs/trispectrum.o objs/P_kappa.o objs/main2D.o
	$(F90C) $(LINKFLAGS) -o $@ $^ $(LIBS)

calcsig8: objs/constants.o objs/precision.o objs/object.o objs/misc.o \
	objs/interp.o objs/diffEq.o objs/integration.o objs/universe.o \
	objs/root.o objs/linearPower.o objs/fit.o objs/PSfits.o objs/chi.o \
	objs/weakLensing.o objs/sici.o objs/nu.o objs/haloModel.o objs/PS.o \
	objs/trispectrum.o objs/P_kappa.o objs/smithp3d.o objs/calcsig8.o
	$(F90C) $(LINKFLAGS) -o $@ $^ $(LIBS)

.PHONY: clean
clean:
	rm -f objs/*.o objs/*.mod
	rm -f P3D
	rm -f calcsig8
	rm -f P2D
	rm -f .depend

.PHONY: distclean
distclean:
	rm -f core objs/*.o objs/*.mod *~
	rm -f P3D
	rm -f calcsig8
	rm -f P2D
	rm -f .depend

